<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     * 应用提供的Artisan命令
     * @var array
     */
    protected $commands = [
        Commands\checkdatabase::class,
        Commands\sync_es_search::class,
        Commands\send_message::class,
        Commands\send_group_sms::class,
        Commands\sync::class,
        Commands\assistant::class,
        Commands\music::class,
        Commands\monitoring::class,
        Commands\init_cron::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule $schedule
     * @return void
     * 定义应用的命令调度
     */
    protected function schedule(Schedule $schedule)
    {
        // 音乐排序
        $schedule->command('music:send music_sort')->everyThirtyMinutes();
        // 用户邀请码监控 每个小时执行一次
        $schedule->command('monitoring:send check_user_code')->hourly();
        // 每天凌晨00::00 执行一次
        $schedule->command('init_cron:send media_like')->dailyAt('00:00');
    }

}
